#ifndef GREP_H
#define GREP_H

#include <regex.h>
#include <stdio.h>
#include <sys/types.h>

struct flags {
  int pattern;                   // e
  int ignore_case;               // i
  int invert;                    // v
  int only_count_of_lines;       // c
  int only_matching_file_names;  // l
  int number;                    // n
  int no_file_names;             // h
  int suppress_error;            // s
  int regex_from_file;           // f
  int output_matching;           // o
};

void grep(FILE* file, char* filename, struct flags flags, regex_t preq);
char* read_line(FILE* file, int ignore_new_line);

#endif